<template>
  <div class="cou-index">
    <div class="cou-header">
      <div class="cou-buttonlist">
        <div v-on:click="isbtnshow" class="cou-btnback">
          <router-link to="/common/courseNav/Content?title=旅游英语" v-on:click="isbtnshow">旅游英语</router-link>
        </div>
        <div class="cou-btnback" v-on:click="isbtnshow">
          <router-link to="/common/courseNav/Contenttwo?title=医疗英语" v-on:click="isbtnshow">医疗英语</router-link>
        </div>
        <div class="cou-button-one cou-button" v-show="!(isshow)">
          <p>旅游英语</p>
        </div>
        <div class="cou-button-two cou-button" v-show="isshow">
          <p>医疗英语</p>
        </div>
      </div>
      <div class="cou-headimg">
        <div>
          <img src="static/images/course-img/history.png" alt="">
        </div>
      </div>
    </div>
    <transition name="myview" mode="out-in">
      <router-view></router-view>
    </transition>

  </div>
</template>

<script>
export default {
  name: 'header',
  data: function () {
    return {
      msg: 'Welcome to Your Vue.js App',
      isshow: false
    }
  },
  methods: {
    isbtnshow: function (event) {
      this.isshow=!(this.isshow)
    }
  },
  mounted:function(){
     this.$router.push({path:'/common/courseNav/Content?title=精品课程'});
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
/*a {*/
  /*text-decoration: none;*/
  /*color: #EAB9B2;*/
  /*display: inline-block;*/
  /*width: 100%;*/
/*}*/
.cou-header {
  background: #E26537;
  height: 30px;
  width: 100%;
  position: relative;
  display: flex;
  padding: 10px 0;
  align-items: center;
  justify-content: space-around;
  font-family: "黑体";
  margin-top: 44px;
}
.cou-buttonlist {
  /*border:  1px black solid;*/
  height: 30px;
  width: 55%;
  position: relative;
  border-radius: 45px;
  overflow: hidden;
}
.cou-btnback {
  width: 50%;
  float: left;
  height: 30px;
  font-size:13px;
  line-height: 30px;
  background-color: #CB5330;
  text-align: center;
}
.cou-button{
  height: 100%;
  width: 55%;
  background-color: #E57E53;
  position: absolute;
  z-index: 10;
  border-radius: 45px;
  text-align: center;
  font-size: 13px;
  line-height: 6px;
  color: white;
}
.cou-button-one {
  left: 0;
}
.cou-button-two {
  right: 0;
}
.cou-headimg img{
  width: 70%;
  height: 90%;
}
.cou-headimg>div{
  margin: 4% auto;
  width: 40%;
  height: 80%;
}
.cou-headimg{
  width: 20%;
  height: 30px;
  background: #E57E53;
  border-radius: 45px;
}
  .myview-enter-active, .myview-leave-active {
    transition: all .3s linear;
  }
  .myview-enter, .myview-leave-active{
    opacity: 0;
  }
  @media (max-width: 320px) {
    .cou-header {
      margin-top: 0;
    }
  }
</style>
